import React, { FC } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import RootPageComponent from '@/pages/components/RootPageComponent/RootPageComponent';
import NotStationed from './NotStationed/NotStationed';
import { ArtistsSettledInContext, useArtistsSettledIn } from './ArtistsSettledInContext';
import ApplySettledIn from './ApplySettledIn/ApplySettledIn';
import RootPageComponentGotoMenu from '@/pages/components/RootPageComponentGotoMenu/RootPageComponentGotoMenu';
export interface IProps extends ICompProps {}
ArtistsSettledIn.defaultProps = {} as Partial<IProps>;
function ArtistsSettledIn(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('ArtistsSettledIn', className);
    const { showComponent, setShowComponent } = useArtistsSettledIn();

    return (
        <ArtistsSettledInContext.Provider value={{ showComponent, setShowComponent }}>
            <RootView className={localClassName} style={style}>
                <RootPageComponent leftTitle={'申请入驻'}  headNavContentRightSlot={<RootPageComponentGotoMenu />}>
                    <View className="ArtistsSettledIn_container">
                        <NotStationed
                            style={{ display: showComponent === 'NotStationed' ? 'flex' : 'none' }}></NotStationed>
                        <ApplySettledIn
                            style={{ display: showComponent === 'ApplySettledIn' ? 'block' : 'none' }}></ApplySettledIn>
                    </View>
                </RootPageComponent>
            </RootView>
        </ArtistsSettledInContext.Provider>
    );
}
export default React.memo(ArtistsSettledIn as FC<IProps>);
const RootView = styled(View)`
    &.ArtistsSettledIn {
    }
`;
